package com.fyzk.activity.chongzhi.epay;

import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;

import java.io.ByteArrayOutputStream;

/**
 * created by GMJ on 2020/3/31 16:36
 * description:
 */
public class Util {
    public static byte[] bmpToByteArray(Bitmap var0, boolean var1) {
        ByteArrayOutputStream var2 = new ByteArrayOutputStream();
        var0.compress(CompressFormat.PNG, 100, var2);
        if (var1) {
            var0.recycle();
        }

        byte[] var4 = var2.toByteArray();

        try {
            var2.close();
        } catch (Exception var3) {
            var3.printStackTrace();
        }

        return var4;
    }
}
